import QuestionList from "./QuestionList";
import Question from "./Question";

export default class PlusQuestionList extends QuestionList{
  async initData(pageId) {
    this.name='20以内加减法'
    //初始化所有题目
    for (let i=1;i<=19;i++){
      for (let j=1;j<=19;j++){
        let title=i+'+'+j
        let answer=i+j
        let item=new Question(title,answer.toString(),this.type);
        this.list.push(item)
        if (i>=j){
          answer=i-j
          title=i+'-'+j
          item=new Question(title,answer.toString(),this.type);
          this.list.push(item)
        }
      }
    }
  }
}
